package io.sunny.platform.ai.deepseek.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.time.Duration;

/**
 * @Author SUNNY
 * @Date 2025/11/29 9:27
 * @PackageName: io.sunny.platform.ai.deepseek.config
 * @Description: 配置类
 * @Version 1.0
 */
@Configuration
@ConfigurationProperties(prefix = "deepseek.api")
@Data
public class DeepSeekConfigProperties {
    private String key;
    private String baseUrl;
    private TimeoutConfig timeout;
    private RetryConfig retry;

    @Data
    public static class TimeoutConfig {
        private Duration connect = Duration.ofSeconds(30);
        private Duration read = Duration.ofSeconds(60);
    }

    @Data
    public static class RetryConfig {
        private int maxAttempts = 3;
        private Duration backoffDelay = Duration.ofSeconds(1);
    }
}
